package com.travel.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 
 * @TableName car_package
 */
@TableName(value ="car_package")
@Data
@Document(indexName = "car_package")
@NoArgsConstructor
@AllArgsConstructor
public class CarPackage implements Serializable {
    /**
     * 汽车套餐表id
     */
    @TableId(value = "id")
    private Integer id;

    /**
     * 所在城市id
     */
    @TableField(value = "city_id")
    private Integer cityId;

    /**
     * 汽车id 对应汽车表
     */
    @TableField(value = "car_id")
    private Integer carId;

    /**
     * 租车公司id
     */
    @TableField(value = "car_company_id")
    private Integer carCompanyId;

    /**
     * 价格
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 牌照
     */
    @TableField(value = "photograph")
    private String photograph;

    /**
     * 取车以及还车方式
     */
    @TableField(value = "pick_return_car")
    private String pickReturnCar;

    /**
     * 取车地点
     */
    @TableField(value = "pick_up_location")
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String pickUpLocation;

    /**
     * 还车地点
     */
    @TableField(value = "return_location")
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String returnLocation;

    /**
     * 汽车数量
     */
    @TableField(value = "number_of_cars")
    private Integer numberOfCars;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}